package com.rk.kbk.model;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.rk.kbk.common.DateJsonDeserializer;
import com.rk.kbk.common.DateJsonSerializer;
import org.hibernate.annotations.GenericGenerator;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.io.Serializable;

/**
 * @Message
 * @消息(message)
 * @version : Ver 1.0
 */
@Entity
public class Message implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * @备注:
	 * @字段:id BIGINT(19)
	 */
	@Id
	@GeneratedValue(strategy= GenerationType.IDENTITY)
	@GenericGenerator(name="auto-identity",strategy="identity")
	@Column(updatable = false, columnDefinition="BIGINT(19) COMMENT ''")
	private java.lang.Long id;

	/**
	 * @备注:标题
	 * @字段:title VARCHAR(99)
	 */
	@Column(columnDefinition="VARCHAR(99) COMMENT '标题'")
	private java.lang.String title;

	/**
	 * @备注:消息内容
	 * @字段:content TEXT(65535)
	 */
	@Column(columnDefinition="TEXT(65535) COMMENT '消息内容'")
	private java.lang.String content;

	/**
	 * @备注:用户类型,0表示所有,1表示用户，2表示骑手，3表示商家
	 * @字段:user_type INT(10)
	 */
	@Column(columnDefinition="INT(10) COMMENT '用户类型,0表示所有,1表示用户，2表示骑手，3表示商家'")
	private java.lang.Integer userType;

	/**
	 * @备注:类型,1表示系统消息,2表示商家订单消息
	 * @字段:type INT(10)
	 */
	@Column(columnDefinition="INT(10) COMMENT '类型,1表示系统消息,2表示商家订单消息'")
	private java.lang.Integer type;

	/**
	 * @备注:
	 * @字段:gmt_datetime DATETIME(19)
	 */
	@Column(updatable = false, columnDefinition="DATETIME(19) COMMENT ''")
	@JsonSerialize(using=DateJsonSerializer.class)
	@JsonDeserialize(using=DateJsonDeserializer.class)
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss" )
	private java.util.Date gmtDatetime = new java.util.Date();

	/**
	 * @备注:
	 * @字段:upt_datetime DATETIME(19)
	 */
	@Column(columnDefinition="DATETIME(19) COMMENT ''")
	@JsonSerialize(using=DateJsonSerializer.class)
	@JsonDeserialize(using=DateJsonDeserializer.class)
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss" )
	private java.util.Date uptDatetime = new java.util.Date();


	private java.lang.String messUrl;


	public Message(){
	}

	public Message(
		java.lang.Long id
	){
		this.id = id;
	}



	public void setId(java.lang.Long id) {
		this.id = id;
	}

	public java.lang.Long getId() {
		return this.id;
	}


	public void setTitle(java.lang.String title) {
		this.title = title;
	}

	public java.lang.String getTitle() {
		return this.title;
	}

	public String getMessUrl() {
		return messUrl;
	}

	public void setMessUrl(String messUrl) {
		this.messUrl = messUrl;
	}

	public void setContent(java.lang.String content) {
		this.content = content;
	}

	public java.lang.String getContent() {
		return this.content;
	}


	public void setUserType(java.lang.Integer userType) {
		this.userType = userType;
	}

	public java.lang.Integer getUserType() {
		return this.userType;
	}


	public void setType(java.lang.Integer type) {
		this.type = type;
	}

	public java.lang.Integer getType() {
		return this.type;
	}


	public void setGmtDatetime(java.util.Date gmtDatetime) {
		this.gmtDatetime = gmtDatetime;
	}

	public java.util.Date getGmtDatetime() {
		return this.gmtDatetime;
	}


	public void setUptDatetime(java.util.Date uptDatetime) {
		this.uptDatetime = uptDatetime;
	}

	public java.util.Date getUptDatetime() {
		return this.uptDatetime;
	}
}
